//
//  appStatus.m
//  XYMaterial
//
//  Created by 肖扬 on 15/12/9.
//  Copyright © 2015年 肖扬. All rights reserved.
//

#import "appStatus.h"
#import <AdSupport/ASIdentifierManager.h>
@implementation appStatus
@synthesize tabBarController,loginSuccess;
@synthesize requestBody;
@synthesize certificate,mode,nav;
@synthesize client_model,client_os,client_os_version,client_latitude,client_longitude,client_device,weixin_pic;
@synthesize hot_keywords,business,provinceArray,cityArray;
+(appStatus *)shareAppStatus
{
    static appStatus *sharedNetCommunication = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        sharedNetCommunication = [[appStatus alloc] init];
    });
    return sharedNetCommunication;
}
-(id)init
{
    CustomTabbarController*custom1=[[CustomTabbarController alloc] init];
    CustomNavController*nav1=[[CustomNavController alloc]init];
    self.nav = nav1;
    self.tabBarController = custom1;
    self.loginSuccess = @"0";
    self.hot_keywords = [NSMutableArray array];
    self.business = [NSMutableArray array];
    self.provinceArray = [NSMutableArray array];
    self.cityArray = [NSMutableArray array];
    /*
     *用户凭证
     *用户登录方式 -- 默认为1
     *手机型号
     *手机操作系统
     *手机操作系统版本号
     *手机纬度
     *手机纬度
     *手机设备号
     */
    self.certificate = @"";
    self.mode = @"1";
    self.client_model = [[UIDevice currentDevice] model];
    self.client_os = @"IOS";
    self.client_os_version = [[UIDevice currentDevice] systemVersion];
    self.client_latitude = @"";
    self.client_longitude = @"";
    self.client_device = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
    NSLog(@"DeviceToken: {%@}",self.client_device);
    return self;
}
@end
